import React from 'react';
import {  Redirect,Switch,Route } from 'react-router-dom';
import Home from "./pages/Home/Home"
import Test from "./pages/Test";
import HomeLayout from './Layout/HomeLayout';
import Login from "./pages/Login/Login";
import CASuccess from './pages/CA/Success';
import CA from './pages/CA';

import User from './pages/User';
import Certificate_type from './pages/CA/Certificate_type';
import productInfo from './pages/CA/productInfo';
import Certificate from './pages/CA/Certificate';
import MoreInfo from './pages/Question';
import Setting from './pages/Setting';
import Introduce from './pages/Introduce';
import Contact from './pages/Contact';
import About from './pages/Introduce';

import FeedBack from './pages/FeedBack'
import Register from './pages/Register';
import ForgetPsw from './pages/ForgetPSW';
// import Study from './pages/Study';
import StudyLayout from './Layout/StudyLayout/StudyLayout';
import Hot from './pages/Hot';
import HotDetail from './pages/Hot/HotDetail';
import HotNewList from "./pages/Hot/NewList";
import Courseware from './pages/Study/Courseware'
import CoursewarePay from './pages/Study/Courseware/Pay'
import coursewarePaySuccess from './pages/Study/Courseware/PaySuccess'

import ExamTreasure from './pages/Study/ExamTreasure';
import ItemBand from './pages/Study/ItemBand';
import ItemBandDetail from './pages/Study/ItemBand/Detail';
import ItemBankMsgDetail from './pages/Study/ItemBand/MsgDetail';
import MockExam from './pages/Study/MockExam';
import MockExamStartExam from './pages/Study/MockExam/StartExam';
import FlyCourse from './pages/FlyCourse';
import AerialPhotography from './pages/FlyCourse/AerialPhotography';
import HotProfession from "./pages/Hot/Profession";
import hotLaw from "./pages/Hot/Law";
import MyPublish from "./pages/TradeMarket/MyPublish";
import Distribute from "./pages/TradeMarket/Distribute";
import Transaction from "./pages/TradeMarket/Transaction";
import TransactionSell from "./pages/TradeMarket/TransactionSell";


import MyTrade from "./Layout/MyTrade";
import TradeSecondHand from "./pages/Trade/SecondHand";
import SecondHandDetail from "./pages/Trade/SecondHand/Detail";
import SecondHandCommitOrder from "./pages/Trade/SecondHand/CommitOrder";
import SecondHandPay from "./pages/Trade/SecondHand/Pay";
import SecondHandOrderDetail from "./pages/Trade/SecondHand/OrderDetail";
import SecondHandOrderDelivery from "./pages/Trade/SecondHand/OrderDelivery";

import TradePublish from "./Layout/TradePublish";
import TradePublishSecond from "./pages/Trade/Publish/SecondHand";
import TradePublishHire from "./pages/Trade/Publish/HireService";


import HireService from "./pages/Trade/HireService";
import hireDetail from "./pages/Trade/HireService/Detail";
import HireServicePay from "./pages/Trade/HireService/Order/Detail";
import HireServicePayDetail from "./pages/Trade/HireService/Order/PayDetail";

import TradeQuality from "./pages/Trade/Quality";
import TradeQualityDetail from "./pages/Trade/Quality/Detail";

import TradeDistribute from "./pages/Trade/Distribute";
import TradeDistributeDetail from "./pages/Trade/Distribute/Detail";
import TradeDistributePay from "./pages/Trade/Distribute/Pay";


const Router=()=>(
    <Switch>
        <Route path='/' exact  component={Home}/>
        <Route path='/Home' component={Home}/>
        <Route path='/Test' component={Test}/>
        <Route path='/UserProfile' component={HomeLayout}/>
        <Route path='/login' component={Login}/>
        <Route path='/register' component={Register}/>
        <Route path='/forgetPsw' component={ForgetPsw}/>
        <Route path='/ca' component={CA}/>
        <Route path='/caSuccess' component={CASuccess}/>
        <Route path='/user' component={User}/>
        { /*证书认证*/ }
        <Route path='/certificate_type' component={Certificate_type}/>
        <Route path='/Certificate' component={Certificate}/>
        <Route path='/question' component={MoreInfo}/>
        <Route path='/introduce' component={Introduce}/>
        <Route path='/contact' component={Contact}/>
        <Route path='/setting' component={Setting}/>
        { /*无人机认证*/ }
        <Route path='/productInfo' component={productInfo}/> 
        <Route path='/about' component={About}/> 
        { /*反馈*/ }
        <Route path='/feedback' component={FeedBack}/>


        {/*学习*/}
        {/* <Route path='/study' component={Study}/> */}
        <Route path='/study/:tab?' component={StudyLayout}/>

        {/*课件*/}
        <Route path='/courseware' component={Courseware}/>
        <Route path='/coursewarePay' component={CoursewarePay}/>
        <Route path='/coursewarePaySuccess/:id/:price/:time' component={coursewarePaySuccess}/>

        {/*应试宝典*/}
        <Route path='/examTreasure' component={ExamTreasure}/>

        {/*题库*/}
        <Route path='/itemBank' component={ItemBand}/>
        {/*题库详情*/}
        <Route path='/itemBankDeatil/:id/:number' component={ItemBandDetail}/>
        <Route path='/itemBankMsgDeatil/:id/:number' component={ItemBankMsgDetail}/>

        <Route path='/AerialPhotography' component={AerialPhotography}/>
        

        {/*模拟考试*/}
        <Route path='/mockExam' component={MockExam}/>
         {/*模拟考试_开始考试*/}
         <Route path='/mockExamStart/:number' component={MockExamStartExam}/>

        {/*Fly派课程*/}
        <Route path='/flyCourse/:key?' component={FlyCourse}/>

        {/* 热点 */}
        <Route path='/hot' component={Hot}/>
        {/* 热点详情 */}
        <Route path='/hotdetail/:id' component={HotDetail}/>
        {/*热点列表 */}
        <Route path='/hotNewList' component={HotNewList}/>
        <Route path='/hotProfession/:content?' component={HotProfession}/>
        <Route path='/hotLaw/:content?' component={hotLaw}/>

        {/* 交易市场 */}
        {/* 我的发布 */}
        <Route path='/tradeMarket/myPublish' component={MyPublish}/>
        {/* 我的派单 */}
        <Route path='/tradeMarket/distribute' component={Distribute}/>
        {/* 我的交易 */}
        <Route path='/tradeMarket/transaction' component={Transaction}/>
        {/* 我的交易卖家 */}
        <Route path='/tradeMarket/transactionSell' component={TransactionSell}/>

        {/* 我要交易 */}
        <Route path='/myTrade' component={MyTrade}/>
        {/* 二手交易 */}
        <Route path='/trade/secondHand' component={TradeSecondHand}/>
        <Route path='/trade/secondHandDetail/:id/:shopType' component={SecondHandDetail}/>
        {/* 提交订单 */}
        <Route path='/trade/secondHandCommit/:id/:shopType' component={SecondHandCommitOrder}/>
        {/* 确认支付 */}
        <Route path='/trade/secondHandPay/:id' component={SecondHandPay}/>
        <Route path='/trade/secondHandOrderDetail/:id' component={SecondHandOrderDetail}/>
        <Route path='/trade/secondHandOrderDelivery/:id' component={SecondHandOrderDelivery}/>

        {/* 我要发布 */}
        <Route path='/tradePublishMain/:type' component={TradePublish}/>
        {/* 我要发布二手 */}
        <Route path='/trade/publishSeond' component={TradePublishSecond}/>
        {/* 发布出租 */}
        <Route path='/trade/publishHire' component={TradePublishHire}/>

        {/* 租赁服务 */}
        <Route path='/trade/hireService' component={HireService}/>
        <Route path='/trade/hireDetail/:id' component={hireDetail}/>
        <Route path='/trade/hireServicePay' component={HireServicePay}/>
        <Route path='/trade/hireServicePayDetail' component={HireServicePayDetail}/>
        
        {/* 派优品 */}
        <Route path='/trade/quality' component={TradeQuality}/>
        <Route path='/trade/qualityDetail/:id' component={TradeQualityDetail}/>

        {/* 派单服务 */}
        <Route path='/trade/distribute' component={TradeDistribute}/>
        <Route path='/trade/distributeDetail/:id' component={TradeDistributeDetail}/>
        <Route path='/trade/distributePay/:id' component={TradeDistributePay}/>

        

        {/* <Route path='/enter919/:id' component={Enter919}/>
        <Route path='/info919/:id/:inviter' component={Info919}/> */}
        
        {/* <Route path="/live" component={LiveBoardcast}/> */}
        <Redirect path="/" to={{pathname: '/'}} />
    </Switch>
)
export default Router;